Skip to content

i18n(hi): add Hindi (हिन्दी) translations - #2301

Open
ankit-fastcurveservices wants to merge 2 commits into
emdash-cms:mainfrom
ankit-fastcurveservices:i18n/hi
Open

i18n(hi): add Hindi (हिन्दी) translations#2301
ankit-fastcurveservices wants to merge 2 commits into
emdash-cms:mainfrom
ankit-fastcurveservices:i18n/hi

Conversation

@ankit-fastcurveservices

Copy link
Copy Markdown

What does this PR do?

Adds Hindi (हिन्दी / hi) translations for the EmDash admin UI.

All 1,938 translatable strings are translated with ICU placeholders preserved, plural forms validated, and consistent Hindi terminology (e.g. पुनर्निर्देश for redirects, कूड़ेदान for trash, फ़ील्ड for schema fields). The locale is enabled in the admin UI.

Follows the same pattern as #872 (Indonesian).

Type of change

  • Bug fix
  • Feature (requires maintainer-approved Discussion)
  • Refactor (no behavior change)
  • Translation
  • Documentation
  • Performance improvement
  • Tests
  • Chore (dependencies, CI, tooling)

Checklist

  • I have read CONTRIBUTING.md
  • pnpm typecheck passes
  • pnpm lint passes
  • pnpm test passes (or targeted tests for my change)
  • pnpm format has been run
  • I have added/updated tests for my changes (N/A — translation only)
  • User-visible strings in the admin UI are wrapped for translation
  • I have added a changeset
  • New features link to an approved Discussion (N/A — translation)

AI-generated code disclosure

  • This PR includes AI-generated code — model/tool: Claude (Cursor), Google Translate API (batch translation), with manual ICU syntax and terminology fixes

Test output

pnpm locale:extract → hi: 1938 total, 0 missing
pnpm locale:compile → Done
msgfmt --check --check-format → OK
msgcmp --use-untranslated → OK
pnpm lint:quick → clean
pnpm format → clean

Notes

  • Hindi (hi) is LTR — no dir property needed
  • All placeholders ({0}, {email}, etc.) preserved unchanged
  • Plural forms use one / other with Hindi inner text
  • Native Hindi review welcome before merge

Made with Cursor

@changeset-bot

changeset-bot Bot commented Jul 31, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5aba475

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 17 packages
Name Type
@emdash-cms/admin Patch
emdash Patch
@emdash-cms/cloudflare Patch
@emdash-cms/sandbox-workerd Patch
@emdash-cms/plugin-mcp-smoke Patch
@emdash-cms/fixture-perf-site Patch
@emdash-cms/perf-demo-site Patch
@emdash-cms/cache-demo-site Patch
@emdash-cms/do-demo-site Patch
@emdash-cms/do-solo-demo-site Patch
@emdash-cms/auth Patch
@emdash-cms/blocks Patch
@emdash-cms/gutenberg-to-portable-text Patch
@emdash-cms/x402 Patch
create-emdash Patch
@emdash-cms/auth-atproto Patch
@emdash-cms/plugin-embeds Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions Bot added review/needs-review No maintainer or bot review yet area/admin size/XL labels Jul 31, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Scope check

This PR changes 8,865 lines across 3 files. Large PRs are harder to review and more likely to be closed without review.

If this scope is intentional, no action needed. A maintainer will review it. If not, please consider splitting this into smaller PRs.

See CONTRIBUTING.md for contribution guidelines.

@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@emdashbot emdashbot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR follows the established translation-only pattern: it adds a complete Hindi PO catalog, enables hi in locales.ts, and includes a patch changeset for @emdash-cms/admin. The approach is sound and fits EmDash’s i18n architecture — there are no code behavior changes outside the admin locale list, so SQL, authorization, content-table filters, and logged-out route queries are all unaffected.

I spot-checked the new catalog against the English source: all ICU tags and placeholders are preserved, plural/select argument names match, and there are no fuzzy or obsolete entries. There are no new tests (correctly marked N/A for a translation), and the changeset package/version bump is appropriate.

The one concrete issue is that four translated strings drop the leading whitespace that exists in their source msgid. These spaces are functional — the strings are concatenated immediately after values or other text — so omitting them produces visible spacing regressions such as slug-अतिथि, filename(चयनित), etc. Fixing those four msgstr lines is the only blocker before I’d be happy to approve.


#: packages/admin/src/routes/bylines.tsx:446
msgid " - Guest"
msgstr "- अतिथि"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[needs fixing] The msgid is " - Guest" with a leading space, but the translation msgstr "- अतिथि" drops it. The calling code concatenates this directly after item.slug (packages/admin/src/routes/bylines.tsx:446), so the slug will abut the hyphen in Hindi (e.g. my-slug-अतिथि). Preserve the leading space from the source string.

Suggested change
msgstr "- अतिथि"
msgstr " - अतिथि"


#: packages/admin/src/routes/bylines.tsx:446
msgid " - Linked"
msgstr "- जुड़ा हुआ"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[needs fixing] The source " - Linked" includes a leading space for the same inline concatenation as " - Guest" (packages/admin/src/routes/bylines.tsx:446). The translation should keep that space so the slug does not run into the hyphen.

Suggested change
msgstr "- जुड़ा हुआ"
msgstr " - जुड़ा हुआ"


#: packages/admin/src/components/MenuEditor.tsx:521
msgid " (opens in new window)"
msgstr "(नई विंडो में खुलता है)"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[needs fixing] The source " (opens in new window)" begins with a space because it is rendered right after a menu label (packages/admin/src/components/MenuEditor.tsx:521). The current translation will appear attached to the preceding text; keep the leading space for consistent spacing.

Suggested change
msgstr "(नई विंडो में खुलता है)"
msgstr " (नई विंडो में खुलता है)"

#: packages/admin/src/components/MediaPickerModal.tsx:867
#: packages/admin/src/components/MediaPickerModal.tsx:950
msgid " (selected)"
msgstr "(चयनित)"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[needs fixing] This string is interpolated into an aria-label as ${item.filename}${selected ? t (selected) : ""} (packages/admin/src/components/MediaPickerModal.tsx:867,950). Dropping the leading space produces filename(चयनित) for screen-reader users. Restore the leading space.

Suggested change
msgstr "(चयनित)"
msgstr " (चयनित)"

@github-actions github-actions Bot added review/awaiting-author Reviewed; waiting on the author to respond and removed review/needs-review No maintainer or bot review yet labels Jul 31, 2026
Adds the Hindi locale catalog with full coverage of admin UI strings,
following the same pattern as the Indonesian locale contribution.
Restore leading whitespace in four msgstr entries where strings are
concatenated inline after slugs, labels, or filenames.
@ankit-fastcurveservices

Copy link
Copy Markdown
Author

Fixed the four leading-whitespace issues flagged in review:

  • " - Guest"" - अतिथि"
  • " - Linked"" - जुड़ा हुआ"
  • " (opens in new window)"" (नई विंडो में खुलता है)"
  • " (selected)"" (चयनित)"

Also rebased onto latest main. Verified hi: 1938 total, 0 missing after rebase.

I have read the CLA Document and I hereby sign the CLA

@github-actions github-actions Bot added review/needs-rereview Author pushed changes since the last review and removed review/awaiting-author Reviewed; waiting on the author to respond labels Aug 3, 2026
@ankit-fastcurveservices

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@pkg-pr-new

pkg-pr-new Bot commented Aug 3, 2026

Copy link
Copy Markdown

Open in StackBlitz

@emdash-cms/admin

npm i https://pkg.pr.new/@emdash-cms/admin@2301

@emdash-cms/auth

npm i https://pkg.pr.new/@emdash-cms/auth@2301

@emdash-cms/auth-atproto

npm i https://pkg.pr.new/@emdash-cms/auth-atproto@2301

@emdash-cms/blocks

npm i https://pkg.pr.new/@emdash-cms/blocks@2301

@emdash-cms/cloudflare

npm i https://pkg.pr.new/@emdash-cms/cloudflare@2301

@emdash-cms/contentful-to-portable-text

npm i https://pkg.pr.new/@emdash-cms/contentful-to-portable-text@2301

emdash

npm i https://pkg.pr.new/emdash@2301

create-emdash

npm i https://pkg.pr.new/create-emdash@2301

@emdash-cms/gutenberg-to-portable-text

npm i https://pkg.pr.new/@emdash-cms/gutenberg-to-portable-text@2301

@emdash-cms/plugin-cli

npm i https://pkg.pr.new/@emdash-cms/plugin-cli@2301

@emdash-cms/plugin-types

npm i https://pkg.pr.new/@emdash-cms/plugin-types@2301

@emdash-cms/registry-client

npm i https://pkg.pr.new/@emdash-cms/registry-client@2301

@emdash-cms/registry-lexicons

npm i https://pkg.pr.new/@emdash-cms/registry-lexicons@2301

@emdash-cms/registry-verification

npm i https://pkg.pr.new/@emdash-cms/registry-verification@2301

@emdash-cms/sandbox-workerd

npm i https://pkg.pr.new/@emdash-cms/sandbox-workerd@2301

@emdash-cms/x402

npm i https://pkg.pr.new/@emdash-cms/x402@2301

@emdash-cms/plugin-ai-moderation

npm i https://pkg.pr.new/@emdash-cms/plugin-ai-moderation@2301

@emdash-cms/plugin-atproto

npm i https://pkg.pr.new/@emdash-cms/plugin-atproto@2301

@emdash-cms/plugin-audit-log

npm i https://pkg.pr.new/@emdash-cms/plugin-audit-log@2301

@emdash-cms/plugin-color

npm i https://pkg.pr.new/@emdash-cms/plugin-color@2301

@emdash-cms/plugin-embeds

npm i https://pkg.pr.new/@emdash-cms/plugin-embeds@2301

@emdash-cms/plugin-field-kit

npm i https://pkg.pr.new/@emdash-cms/plugin-field-kit@2301

@emdash-cms/plugin-forms

npm i https://pkg.pr.new/@emdash-cms/plugin-forms@2301

@emdash-cms/plugin-webhook-notifier

npm i https://pkg.pr.new/@emdash-cms/plugin-webhook-notifier@2301

commit: 5aba475

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/admin cla: signed review/needs-rereview Author pushed changes since the last review size/XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant